package com.zyj.java1;

/**
 * @program: JVMDemo
 * @ClassName StringTest4
 * @author: YaJun
 * @Date: 2021 - 12 - 27 - 11:36
 * @Package: com.zyj.java
 * @Description:
 */
public class StringTest4 {

    /**
     * Debug看memory
     * @param args
     */
    public static void main(String[] args) {
        System.out.println(); // 2203
        System.out.println("1"); // 2204
        System.out.println("2"); // 2205
        System.out.println("3");
        System.out.println("4");
        System.out.println("5");
        System.out.println("6");
        System.out.println("7");
        System.out.println("8");
        System.out.println("9");
        System.out.println("10"); // 2213

        // 如下的字符串 "1" 到 "10" 不会再次加载

        System.out.println("1"); // 2214
        System.out.println("2"); // 2214
        System.out.println("3");
        System.out.println("4");
        System.out.println("5");
        System.out.println("6");
        System.out.println("7");
        System.out.println("8");
        System.out.println("9");
        System.out.println("10"); // 2214

    }

}
